home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.plaf.basic;
-
- import java.awt.Rectangle;
- import java.beans.PropertyChangeEvent;
- import java.beans.PropertyChangeListener;
- import javax.swing.event.DocumentEvent;
- import javax.swing.event.DocumentListener;
- import javax.swing.text.Document;
-
- class BasicTextUI$UpdateHandler implements PropertyChangeListener, DocumentListener {
- // $FF: synthetic field
- private final BasicTextUI this$0;
-
- BasicTextUI$UpdateHandler(BasicTextUI var1) {
- this.this$0 = var1;
- }
-
- public final void changedUpdate(DocumentEvent var1) {
- Rectangle var2 = this.this$0.painted ? this.this$0.getVisibleEditorRect() : null;
- this.this$0.rootView.changedUpdate(var1, var2, this.this$0.rootView.getViewFactory());
- }
-
- public final void insertUpdate(DocumentEvent var1) {
- Rectangle var2 = this.this$0.painted ? this.this$0.getVisibleEditorRect() : null;
- this.this$0.rootView.insertUpdate(var1, var2, this.this$0.rootView.getViewFactory());
- }
-
- public final void propertyChange(PropertyChangeEvent var1) {
- Object var2 = var1.getOldValue();
- Object var3 = var1.getNewValue();
- if (var2 instanceof Document || var3 instanceof Document) {
- if (var2 != null) {
- ((Document)var2).removeDocumentListener(this);
- }
-
- if (var3 != null) {
- ((Document)var3).addDocumentListener(this);
- }
-
- this.this$0.modelChanged();
- }
-
- this.this$0.propertyChange(var1);
- }
-
- public final void removeUpdate(DocumentEvent var1) {
- Rectangle var2 = this.this$0.painted ? this.this$0.getVisibleEditorRect() : null;
- this.this$0.rootView.removeUpdate(var1, var2, this.this$0.rootView.getViewFactory());
- }
- }
-